//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { Review, ReviewResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooReviewList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<ReviewResponse>(`/uctoo/review/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooReview = async (id: string) => {
  return requestClient.get<Review>(`/uctoo/review/${id}`);
};

export const adductooReview = async (data: Partial<Review>) => {
  return requestClient.post<Review>('/uctoo/review/add', data);
};

export const edituctooReview = async (data: Partial<Review>) => {
  return requestClient.post<Review>('/uctoo/review/edit', data);
};

export const deleteuctooReview = async (id: string) => {
  return requestClient.post<any>('/uctoo/review/del', { id });
};
